from datetime import datetime

from applications.extensions import db


# 情绪课程训练成绩
class EmotionResult(db.Model):
    __tablename__ = 'student_grade'
    id = db.Column(db.Integer, primary_key=True)
    user_id = db.Column(db.Integer)
    username = db.Column(db.String(255))
    user_course_types = db.Column(db.String(255))
    user_course_names = db.Column(db.String(255))
    user_course_details = db.Column(db.String(255))
    user_date = db.Column(db.DateTime)
    user_grade = db.Column(db.String(255))


# 动作反应训练成绩
class ResponseResult(db.Model):
    __tablename__ = 'grade_reaction'
    grade_id = db.Column(db.Integer, primary_key=True, comment='课程成绩主键')
    student_id = db.Column(db.Integer, comment='课程成绩学生id')
    course_id = db.Column(db.Integer, comment='课程id')
    grade = db.Column(db.String(255), comment='成绩')
    train_time = db.Column(db.DateTime, default=datetime.now, comment='训练时间')


# 动作标准训练成绩
class StandardResult(db.Model):
    __tablename__ = 'grade_std'
    grade_id = db.Column(db.Integer, primary_key=True, comment='课程成绩主键')
    student_id = db.Column(db.Integer, comment='课程成绩学生id')
    course_id = db.Column(db.Integer, comment='课程id')
    action_id = db.Column(db.Integer, comment='动作id')
    grade = db.Column(db.String(255), comment='成绩')
    train_time = db.Column(db.DateTime, default=datetime.now, comment='训练时间')


# 情绪课程训练成绩
class PsychologyResult(db.Model):
    __tablename__ = 'student_grade_men'
    id = db.Column(db.Integer, primary_key=True)
    user_id = db.Column(db.Integer)
    username = db.Column(db.String(255))
    user_course_types = db.Column(db.String(255))
    user_course_names = db.Column(db.String(255))
    user_course_details = db.Column(db.String(255))
    user_date = db.Column(db.DateTime)
    user_grade = db.Column(db.String(255))